﻿CREATE proc [dbo].[danhmucDonGia_NVL_TP_Them]  
@matp varchar(20),
@tentp nvarchar(255),
@dvt nvarchar(50),
--@sln float,
@dgnvl float,
--@tylepb float,
--@chisopb float,
--@ttn float,
--@dongia float,
@mmyy varchar(10) 
as  
if  exists(select * from DM_DG_NVL_TP   Where matp =@matp   )  
begin  

select ErrCode=0
end  
else  
begin  
insert into DM_DG_NVL_TP(matp,tentp, dvt,dgnvl,mmyy)  
    values(@matp,@tentp, @dvt, @dgnvl,@mmyy)   
select ErrCode=1  
end